package com.xunbao.thread.util;

import com.xunbao.utils.DateUtils;

import java.util.concurrent.Callable;

/**
 * Created with IntelliJ IDEA.
 * ClassName:MyTask
 * Description:
 * Author:yijiawei
 * Date: 2016/5/30 9:49
 */
public class MyTask implements Callable {

    private String name;

    public MyTask(String name) {
        this.name = name;
    }

    @Override
    public Object call() throws Exception {
        for (int i = 0; i < 3; i++) {
            System.out.println("MyTask - name=" + name + " - " + i);
        }
        System.out.println(DateUtils.getNowDateStr());
        return null;
    }
}
